//300
class Solution {
    public int lengthOfLIS(int[] nums) {
        int max = 0;
        int len = nums.length;
        int[] arr = new int[len];
        for (int i = 1; i  len; i++) {
            for(int j = i-1; j = 0; j--) {
                if (nums[j]  nums[i]) {
                    arr[i] = Math.max(arr[j] + 1, arr[i]);
                } else if (nums[j] == nums[i]) {
                    arr[i] = Math.max(arr[j], arr[i]);
                    break;
                }
                
            }
            max = Math.max(max, arr[i]);
        }
        System.out.println(Arrays.toString(arr));
        return max+1;
    }
}